package com.bana.fvs.protocol;

import com.bana.sys.protocol.Protocol;

import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
import java.io.IOException;

public class SetScreen extends Protocol {
    @Override
    public short getId()
    {
        return 0xB0;
    }

    public byte[] request(int card,int speed,int size) throws IOException {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        DataOutputStream dos = new DataOutputStream(baos);
        dos.writeByte(card);
        dos.writeByte(speed);
        dos.writeShort(size);
        byte[] buffer= baos.toByteArray();
        dos.close();
        baos.close();
        return fillHead(buffer);
    }
}
